}
}
-static gboolean
-gdk_surface_is_subsurface (GdkSurface *surface)
-{
- return surface->surface_type == GDK_SURFACE_SUBSURFACE;
-}
-
static GdkSurface *
gdk_surface_get_impl_surface (GdkSurface *surface)
{
old_abs_y = private->abs_y;
/* Update absolute position */
- if ((gdk_surface_has_impl (private) &&
- private->surface_type != GDK_SURFACE_SUBSURFACE) ||
- (gdk_surface_is_toplevel (private) &&
- private->surface_type == GDK_SURFACE_SUBSURFACE))
+ if (gdk_surface_has_impl (private))
{
/* Native surfaces and toplevel subsurfaces start here */
private->abs_x = 0;
if (parent != NULL)
g_warning (G_STRLOC "Toplevel surfaces must be created without a parent");
break;
- case GDK_SURFACE_SUBSURFACE:
-#ifdef GDK_WINDOWING_WAYLAND
- if (!GDK_IS_WAYLAND_DISPLAY (display))
- {
- g_warning (G_STRLOC "Subsurface surfaces can only be used on Wayland");
- return NULL;
- }
-#endif
- break;
case GDK_SURFACE_CHILD:
break;
default:
native = TRUE; /* Always use native surfaces for toplevels */
}
-#ifdef GDK_WINDOWING_WAYLAND
- if (surface->surface_type == GDK_SURFACE_SUBSURFACE)
- native = TRUE; /* Always use native windows for subsurfaces as well */
-#endif
-
if (native)
{
/* Create the impl */
case GDK_SURFACE_TOPLEVEL:
case GDK_SURFACE_CHILD:
case GDK_SURFACE_TEMP:
- case GDK_SURFACE_SUBSURFACE:
if (surface->parent)
{
if (surface->parent->children)
{
g_return_val_if_fail (GDK_IS_SURFACE (surface), NULL);
- if (gdk_surface_is_subsurface (surface))
- return surface->transient_for;
- else
- return surface->parent;
+ return surface->parent;
}
/**
{
g_return_val_if_fail (GDK_IS_SURFACE (surface), NULL);
- while (surface->surface_type == GDK_SURFACE_CHILD ||
- surface->surface_type == GDK_SURFACE_SUBSURFACE)
+ while (surface->surface_type == GDK_SURFACE_CHILD)
{
if (gdk_surface_is_toplevel (surface))
break;
* GdkSurfaceType:
* @GDK_SURFACE_TOPLEVEL: toplevel window (used to implement #GtkWindow)
* @GDK_SURFACE_CHILD: child surface (used to implement e.g. #GtkEntry)
- * @GDK_SURFACE_TEMP: override redirect temporary surface (used to implement
- * #GtkMenu)
- * @GDK_SURFACE_SUBSURFACE: subsurface; This surface is visually
- * tied to a toplevel, and is moved/stacked with it. Currently this window
- * type is only implemented in Wayland
+ * @GDK_SURFACE_TEMP: override redirect temporary surface (used to implement #GtkMenu)
*
* Describes the kind of surface.
*/
{
GDK_SURFACE_TOPLEVEL,
GDK_SURFACE_CHILD,
- GDK_SURFACE_TEMP,
- GDK_SURFACE_SUBSURFACE
+ GDK_SURFACE_TEMP
} GdkSurfaceType;
/* Size restriction enumeration.